package abtractTokens;

/**
 * The generic token class
 * 
 * @author James Marquardt
 * @author Abraham Santini
 *
 */

public class GeneralToken implements Token{
	/**
	 * The String representation of the value of the token.
	 */
	 private String my_value;
	 /**
	  * The type of the Token.  Uses the TokenEnum class.
	  */
	 private TokenEnum my_type;
	 
	 /**
	  * Constructor for a generic token
	  * @param the_value
	  */
	 public GeneralToken(String the_value){
		 my_value = the_value;
	 }
	/**
	 * Returns the token type.
	 * @return The token type.
	 */
	 public TokenEnum getType() {
		return my_type; 
	 }
	 /**
	  * The String representation of the value of the token.
	  * @return The string representation.
	  */
	 public String toString(){
			return my_value;
	 }
	 /**
	  * Sets my_type to the type of token.  Used in specific token constructors.
	  * @param the_type
	  */
	 protected void setType(TokenEnum the_type) {
		 my_type = the_type;
	 }
	

} // end token